﻿@model KL.Store.Web.Models.ShowImageGetModel
@using KL.Store.Core
@{
    Layout = "~/Views/Shared/_LayoutBasic.cshtml";
}
<div id="updateMultiImageForm">
    @using (Html.BeginForm("UploadImageMulti", "Upload", null, FormMethod.Post, new { id = "imageuploadform", name = "imageuploadform", @class = "form-horizontal editform", enctype = "multipart/form-data" }))
    {
        @Html.AntiForgeryToken()
        <input type="hidden" name="Id" value="@Model.id" />
        <input type="hidden" name="Password" value="@Model.password" />
        <input type="hidden" name="ImageType" value="Product" />
        <input type="hidden" name="FileName" value="" />
        <div class="col-xs-8 first last">
            <div class="form-group">
                <label for="imgSlot1" class="col-xs-1 first last">Slot 1</label>
                <div class="col-xs-11 first last">
                    <input type="file" name="files" id="imgSlot1" />
                </div>
            </div>
            <div class="form-group">
                <label for="imgSlot2" class="col-xs-1 first last">Slot 2</label>
                <div class="col-xs-11 first last">
                    <input type="file" name="files" id="imgSlot2" />
                </div>
            </div>
            <div class="form-group">
                <label for="imgSlot3" class="col-xs-1 first last">Slot 3</label>
                <div class="col-xs-11 first last">
                    <input type="file" name="files" id="imgSlot3" />
                </div>
            </div>
            <div class="form-group">
                <label for="imgSlot4" class="col-xs-1 first last">Slot 4</label>
                <div class="col-xs-11 first last">
                    <input type="file" name="files" id="imgSlot4" />
                </div>
            </div>
            <div class="form-group">
                <label for="imgSlot5" class="col-xs-1 first last">Slot 5</label>
                <div class="col-xs-11 first last">
                    <input type="file" name="files" id="imgSlot5" />
                </div>
            </div>
        </div>
        <div class="col-xs-4 first last">
            <button class="btn btn-custom1 right">Yükle</button>
        </div>
    }
</div>
<script>
    var message = '@Model.message';
    if (message == "Sifreyi Kontrol Ediniz.")
    {
        parent.location.reload(true);
        //alert('Şifre yükleme hatası. Yöneticiye başvurun.');
    }
    else if (message == "Resim Kaydedildi." || message == "Resim Silindi.")
    {
        parent.location.reload(true);
    }
    else if (message == "Bilinmeyen ImageType.")
    {
        parent.location.reload(true);
        //alert('Bilinmeyen/Desteklenmeyen dosya tipi hatası. Yöneticiye başvurun.');
    }
    else if (message == "RefreshIt")
    {
        parent.location.reload(true);
    }
    else if (message == "")
    {
    }
    else
    {
        parent.location.reload(true);
        //alert('Bilinmeyen hata. Tekrar deneyin veya yöneticiye başvurun.');
    }
</script>
